<!--{include file="<!--{$oetplpath}-->public/widget_header.tpl"}-->
<div class="oereg_top">
  <div class="oereg_topcon">
    <div class="oereg_logo">
	  <a href="<!--{$config.siteurl}-->"><img src="<!--{$urlpath}--><!--{$config.logo}-->" /></a>
	</div>
    <div class="oereg_right">微信支付</div>
    <div class="clear"></div>
  </div>
</div>

<div class="oe_pay_list">
  <div class="hd"> 
    <ul>
	  <li class="li_1">订单提交成功，请您尽快付款！ 订单号：<!--{$payorder.paynum}--></li>
      <li class="li_2">
	  （<!--{$payorder.title}-->）
	  请您尽快完成支付，否则订单会被取消哦！
	  </li>
    </ul>
    <div class="money">应付金额<b><!--{$payorder.amount}--></b>元</div>
  </div>

  <div class="bd_3">
    <p class="p_1">
      <span></span>
    </p>
    <p class="p_2">
      <img src="<!--{$oefile}-->?c=pay&a=wxqrcode&size=6&wxpaycode=<!--{$wxpay_code}-->&r=<!--{$time}-->"  />
    </p>
    <p class="p_3">
      使用微信扫码二维码支付
    </p>
  </div>

</div>
<!--{include file="<!--{$oetplpath}-->public/widget_footer.tpl"}-->

<script type="text/javascript">
$(function(){
	_reqPayResult();
});
//支付结果请求
function _reqPayResult() {
	$.ajax({
		type: "POST",
		url: "<!--{$oefile}-->?c=pay&a=checkpay",
		cache: false,
		data: {paynum:"<!--{$payorder.paynum}-->", r:get_rndnum(8)},
		dataType: "json",
		success: function($data) {
			$json = eval($data);
			$response = $json.response;
			$result = $json.result;
			if ($response == "1") {
				if ($result == "10") { //成功
					window.location.href = "<!--{$oefile}-->?c=pay&a=show&paynum=<!--{$payorder.paynum}-->";
				}
				else if ($result == "11") { //失败
					window.location.href = "<!--{$oefile}-->?c=pay&a=show&paynum=<!--{$payorder.paynum}-->";
				}
				else {
					setTimeout(function(){
						_reqPayResult();
					}, 1000);
				}
			}
			else {

			}
		},
		error: function() {

		}
	});
}
</script>
</body>
</html>